//
//  BNDPreference.h
//  OfficeDoc
//
//  Created by pie on 2022/3/30.
//  Copyright © 2022 pie. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AliyunOSSiOS/AliyunOSSiOS.h>
#import "BNDOfficeDocHandle.h"
#import "BNDConstance.h"


@class BndUser;
NS_ASSUME_NONNULL_BEGIN

@interface BNDPreference : NSObject


@property (copy, nonatomic) NSString *companyOpenId; //公司id
@property (copy, nonatomic) NSString *openId;  //个人id
@property (copy, nonatomic) NSString *token;  //鉴权token
@property (copy, nonatomic) NSString *companyName;  //公司名称
@property (assign, nonatomic) BOOL isAdmin;  //是否管理员
@property (readonly,strong,nonatomic) OSSClient *client;  //oss上传管理
@property (readonly,strong,nonatomic) BndUser *userInfo;  //用户信息


///实名跳转调用
@property (copy, nonatomic) BNDBlock realNameJumpBlock;



/**
 *  单例对象
 *
 *  @return 返回单例实例
 */
+ (BNDPreference *)sharedInstance;


/// 处理公司信息
+ (void)handleCompanyInfo;

/// 处理用户信息
+ (void)handleUserInfo;

/// 初始化oss上传管理
+ (void)hanOSSUploadFile;



/// 跳转公告详情(推送专用)
/// @param officeDocId  公告id
+ (void)handleOfficeDocDetailsVc:(NSString * _Nullable )officeDocId;


/// 跳转公告列表首页
+ (void)handleOfficeDocListVc;

/// 跳转首页
+ (void)handlePushHomeVc;

/// 获取图片地址
/// @param objectKey  图片名字
- (NSString*)handleProduceImageUrl:(NSString* _Nullable)objectKey;

/// 处理文件图片类型
/// @param fileType  文件类型
+ (NSString*)handleFileImageName:(NSString*)fileType;


/// 获取本地图片
/// @param string  图片名字
+ (UIImage*)getLocalImage:(NSString*)string;
@end

NS_ASSUME_NONNULL_END
